<template>
        <div id="char6" style="height: 250px;"></div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { ECharts, EChartsOption, init } from 'echarts';
const props=defineProps({
    data:{
        type:Object,
        default:()=>{}
    }
})
onMounted(() => {
    const {type,repeatdata,waitdata,waitpaydata} = props.data
    // 表6
    const charEle6 = document.getElementById('char6') as HTMLElement;
    const charEch6: ECharts = init(charEle6);
    const option6: EChartsOption = {
        legend: {},
        tooltip: {},
        dataset: {
            source: [
                ['product', '等候人次', '等缴费', '复诊'],
                [type[0], repeatdata[0], waitdata[0], waitpaydata[0]],
                [type[1], repeatdata[1], waitdata[1], waitpaydata[1]],
                [type[2], repeatdata[2],waitdata[2], waitpaydata[2]],
                [type[3], repeatdata[3], waitdata[3], waitpaydata[3]],
                [type[4], repeatdata[4], waitdata[4], waitpaydata[4]],
                [type[5], repeatdata[5], waitdata[5], waitpaydata[5]],
                [type[6], repeatdata[6], waitdata[6], waitpaydata[6]],
                [type[7], repeatdata[7], waitdata[7], waitpaydata[7]],
                [type[8], repeatdata[8], waitdata[8], waitpaydata[8]],
                [type[9], repeatdata[9], waitdata[9], waitpaydata[9]],
                [type[10], repeatdata[10], waitdata[10], waitpaydata[10]],
            ]
        },
        xAxis: { type: 'category' },
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [{ type: 'bar' }, { type: 'bar' }, { type: 'bar' }]
    };
    charEch6.setOption(option6);
})
</script>

<style scoped>

</style>